class Restaurant ():
    def __init__(self, restaurant_name, cuisine_type):
        self.restaurant_name = restaurant_name
        self.cuisine_type = cuisine_type
    def describe_restaurant(self):
        print("餐馆的名字: "+self.restaurant_name)
        print("烹饪方法: "+self.cuisine_type)
    def open_restaurant(self):
        print("The "+self.restaurant_name+" is open.")
restaurant = Restaurant('美食驾到','中餐')
print("餐馆的名字: "+restaurant.restaurant_name)
print("烹饪方法: "+restaurant.cuisine_type)
restaurant.describe_restaurant()
restaurant.open_restaurant()



class Restaurant():
    """创建一个餐厅:描述名字和是否营业"""

    def __init__(self, restaurant_name, cuisine_type):
        """初始化餐厅属性"""
        self.restaurant_name = restaurant_name
        self.cuisine_type = cuisine_type

    def describe_restaurant(self):
        """给餐厅起名字以及显示菜单"""
        print("餐厅的名字：" + self.restaurant_name)
        print("烹饪方法：" + self.cuisine_type)

    def open_restaurant(self):
        """餐厅开业"""
        print("The " + self.restaurant_name + " is open.")


restaurant = Restaurant('人间美味', '中餐')  # 创建餐厅

print("餐厅的名字：" + restaurant.restaurant_name)  # 访问属性
print("烹饪方法：" + restaurant.cuisine_type)  # 访问属性

restaurant.describe_restaurant()  # 调用方法
restaurant.open_restaurant()  # 调用方法
